﻿using System.Collections.Generic;
using System;
using QD.Data;
using QD.Data.Page;
using QD.Data.Query;

namespace QD.Repository
{
    public interface IRepository<T> where T:new ()
    {

        Int32 Create(params T[] entities);

        Int32 Update(params T[] entities);

        Int32 Delete(params Object[] pk);

        Int32 Delete(Query query);

        Boolean Exists(Object pk);

        Int32 Count(Query query);

        Int32 Count(String where);

        T Get(object id);

        PageList<T> Find(Int32 page, Int32 pagesize);

        PageList<T> Find(Int32 page, Int32 pageize, Query query);

        PageList<T> Find(Int32 page, Int32 pageize, String where, String order);
      
        IList<T> Find();

        IList<T> Find(Query query);
    }
}
